package com.dj.product.k2faas.jpa.query;

import lombok.Data;

/**
 * Created by 丁建 on 2025/9/23 09:59
 *
 * @author 丁建
 */
@Data
public class Query {
    private Type type;

    private String propName;

    private Object val;

    private String[] blurry;

    public Query() {
    }

    public Query(Type type, String propName, Object val, String[] blurry) {
        this.type = type;
        this.propName = propName;
        this.val = val;
        this.blurry = blurry;
    }

    public static Query build(Type type, String propName, Object val) {
        return new Query(type, propName, val, null);
    }

    public static Query build(Type type, String propName) {
        return new Query(type, propName, null, null);
    }

    public static Query build(String[] blurry, Object val) {
        return new Query(null, null, val, blurry);
    }

    public static Query build(Type type, String propName, Object val, String[] blurry) {
        return new Query(type, propName, val, blurry);
    }
}
